package com.rom.ratethehell.rate.custom_views;

import com.rom.ratethehell.R;
import com.rom.ratethehell.entities.Comment;

import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TableRow;
import android.widget.TextView;

public class CommentView extends TableRow {

	private TextView userNameView;
	private TextView dataView;
	public CommentView(Context context, AttributeSet attrs) {
		super(context, attrs);
		init(context);
	}
	public CommentView(Context context) {
		super(context);
		init(context);
	}
	private void init(Context context) {
		LayoutInflater inflater = (LayoutInflater)   getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); 
		inflater.inflate(R.layout.view_comment, this);
		userNameView = (TextView) findViewById(R.id.comment_user_name);
		dataView = (TextView) findViewById(R.id.comment_data);
	}
	public CommentView(Context context, String userName, String comment) {
		super(context);
		init(context);

		userNameView.setText(userName + " : ");
		dataView.setText(comment);
	}
	public CommentView(Context context, Comment c) {
		super(context);
		init(context);
		userNameView.setText(c.username + " : ");
		dataView.setText(c.comment);
	}


}
